package Ch4;

/**
 * Created by Cai Ye on 2016/3/25.
 */
public class OceanWorld4Human {
    protected String name;

    public OceanWorld4Human(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public class SwimPlayer extends OceanWorld4Human implements OceanWorld1Swimmer {
        public SwimPlayer(String name) {
            super(name);
        }

        @Override
        public void swim() {
            System.out.printf("游泳选手 %s 游泳%n", name);
        }
    }
}
